﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Rebides
{
    public class DataSave
    {
        public string text1;
        public string text2;
        public int number1;
        public int number2;

        public DataSave(string text1)
        {
            this.text1 = text1;
        }

        public DataSave(string text1, int number1)
        {
            this.text1 = text1;
            this.number1 = number1;
        }

        public DataSave(string text1, string text2)
        {
            this.text1 = text1;
            this.text2 = text2;
        }

        public DataSave(string text1, string text2, int number1)
        {
            this.text1 = text1;
            this.text2 = text2;
            this.number1 = number1;
        }

        public DataSave(int number1, int number2)
        {
            this.number1 = number1;
            this.number2 = number2;
        }

        public override string ToString()
        {
            string line = "";

            if (this.text1 != null && this.text2 != null && this.number1 != 0)
                line += this.text1 + " -> " + this.text2 + " -> " + this.number1;

            else if (this.text1 != null && this.text2 != null)
                line += this.text1 + " -> " + this.text2;

            else if (this.text1 != null && this.number1 != 0)
                line += this.text1 + " -> " + this.number1;

            else if (this.text1 == null)
                line += this.number1 + " -> " + this.number2;
            else
                line += this.text1;

            return line;
        }
    }
}
